home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 2 / Geek_Gadgets_2_2352.bin / lists / ade-gcc.archive.9602.gz / ade-gcc.archive.9602 / 000093_owner-ade-gcc_Mon Feb 19 08:19:47 1996.msg < prev    next >
Internet Message Format  |  1996-02-28  |  2KB

  1. Return-Path: <owner-ade-gcc>
  2. Received: by fishpond (Smail3.1.29.1 #57)
  3.     id m0toVUg-000gXba; Mon, 19 Feb 96 08:19 EST
  4. Sender: owner-ade-gcc
  5. Received: from delta.mdy.univie.ac.at by fishpond with smtp
  6.     (Smail3.1.29.1 #57) id m0toVUa-000gXUC; Mon, 19 Feb 96 08:19 EST
  7. Received: from localhost by delta.mdy.univie.ac.at with SMTP
  8.     (1.38.193.4/16.2) id AA22241; Mon, 19 Feb 1996 14:13:07 +0100
  9. Message-Id: <31287761.20B3@mdy.univie.ac.at>
  10. Date: Mon, 19 Feb 1996 14:13:05 +0100
  11. From: Alfred Minarik <am@mdy.univie.ac.at>
  12. X-Mailer: Mozilla 2.0 (X11; I; HP-UX A.09.05 9000/720)
  13. Mime-Version: 1.0
  14. To: Kamil Iskra <kiskra@ernie.icslab.agh.edu.pl>
  15. Cc: amiga-gcc-port@nic.funet.fi, ADE GCC List <ade-gcc@ninemoons.com>
  16. Subject: Re: Passing arguments in registers and stack checking/extension
  17. References: <Pine.SUN.3.91.960219131058.6881A-100000@ernie>
  18. Content-Type: text/plain; charset=us-ascii
  19. Content-Transfer-Encoding: 7bit
  20. Sender: owner-ade-gcc@ninemoons.com
  21. Precedence: bulk
  22.  
  23. Kamil Iskra wrote:
  24. > d0/d1/a0/a1 are scratch registers, ie. you don't have to preserve them
  25. > across function calls. All the other registers has to be preserved.
  26. > If I remember correctly, current structure of function prologue used in
  27. > Amiga port of GCC is the following ([] are optional):
  28. > [
  29. > 1. Put amount of place needed for frame in d0, as an argument for [2].
  30. > 2. Call stack checking/extension routine.
  31. > ]
  32. > 3. Create a stack frame (link).
  33. > 4. Save non-scratch registers used inside function body on stack.
  34. > If you wanted to use "d2" as an argument to stack checking/extension, you
  35. > would have to preserve it. However, as you can see, saving non-scratch
  36. > registers is (very reasonably) performed AFTER stack checking. This is the
  37. > problem.
  38. > Maybe I misunderstood you, but what do you need (+a2) for (actually: what
  39. > do you MEAN by "(+a2)")?
  40.  
  41. You are absolutly right.
  42. So we might split the scrach registers one (maybe d0) for stack
  43. routines, others for argument passing. (Will complicate (link)libraries
  44. if you want to use all scratch registers in case of no stack routines
  45. [You need probably two different compiled libraries]).
  46. And I don't know wether this is efficient, nor if it can easily be
  47. imlemented.
  48. It was all only a quick idea. 
  49.  
  50.  - Alfred